import type { MockConfig, MockMethod } from "vite-plugin-mock";

import Mock from "mockjs";

import baseResponse from "./base";

export default (config?: MockConfig) => {
  return [
    {
      url: "/api/getRecommend",
      method: "get",
      response: ({ body }: { body: any }) => {
        
        const data = {
          sliders: [
            //首页-轮播图
            {
              id: "https://i.y.qq.com/n2/m/digitalbum/buy/index.html?mid=0046eTZI0iIjKF&_video=true&_hidehd=1&_miniplayer=1&g_f=yqqjiaodian",
              pic: "/images/sliders/4657716.jpg",
              link: "https://i.y.qq.com/n2/m/digitalbum/buy/index.html?mid=0046eTZI0iIjKF&_video=true&_hidehd=1&_miniplayer=1&g_f=yqqjiaodian",
            },
            {
              id: "39670373",
              pic: "/images/sliders/4660742.png",
              link: "https://y.qq.com/n/yqq/album/004QptEE3PCFy2.html",
            },
            {
              id: "39667272",
              pic: "/images/sliders/4660238.png",
              link: "https://y.qq.com/n/yqq/album/003dRSDz34ajY2.html",
            },
            {
              id: "https://g.y.qq.com/forest/xtQ1UQIfgJSbaxXW/index.html",
              pic: "/images/sliders/4659689.jpg",
              link: "https://g.y.qq.com/forest/xtQ1UQIfgJSbaxXW/index.html",
            },
            {
              id: "39769866",
              pic: "/images/sliders/4659850.png",
              link: "https://y.qq.com/n/yqq/album/001j35Nv3HjVzk.html",
            },
            {
              id: "39770208",
              pic: "/images/sliders/4659953.jpg",
              link: "https://y.qq.com/n/yqq/album/001fRdaF1R2qe9.html",
            },
            {
              id: "39790295",
              pic: "/images/sliders/4660718.png",
              link: "https://y.qq.com/n/yqq/album/003R6TlH0zsoXp.html",
            },
          ],
          albums: [
            //首页-推荐歌单
            {
              id: 7426529126,
              username: "澄江霁雨.",
              title: "「片段」你与星河皆不可及",
              pic: "http://qpic.y.qq.com/music_cover/LQ4zic8aEyNEreHko5rQ2a6S0JjhXjvoxzTWXvqiaZDDvJWlibGcCWa4g/300?n=1",
            },
            {
              id: 8081864568,
              username: "一鱼",
              title: "放空冥想丨解开脑海里的弦",
              pic: "http://qpic.y.qq.com/music_cover/icF4iau8Sj7b1judxoK8Mf70sxhVkvWpMRxCkokYqWaxndibYq2TjE2kQ/300?n=1",
            },
            {
              id: 7789860767,
              username: "今天星期几",
              title: "游戏高燃BGM！全程高能一燃到底",
              pic: "http://qpic.y.qq.com/music_cover/7axJgSibuQNcws5JAbn8TT6sia6Kp4RxzuicheNL7ODmAdK0ZP550v1wQ/300?n=1",
            },
            {
              id: 2670809544,
              username: "白衣沐风",
              title: "「深夜咖啡馆」自在享受一份恬静",
              pic: "http://qpic.y.qq.com/music_cover/vQcJ7UZxNjMicEvtoTjyV1mUKVXhMWick4I4N1gDacXlt1NMKoUUIqoQ/300?n=1",
            },
            {
              id: 7658602597,
              username: "小众又怎样",
              title: "你很熟悉却不知道歌名的BGM",
              pic: "http://qpic.y.qq.com/music_cover/8eiaDBJ27yYicpMibYZmmEdNOvXEIcsWe4mshVgMXV9G50Fy2Q8Nu4VOw/300?n=1",
            },
            {
              id: 8026268505,
              username: "小暖",
              title: "夏日拍照计划：掉进可爱的颜色里",
              pic: "http://qpic.y.qq.com/music_cover/hlZUYgj8FnMFqmDjbhO9kXk67vWYjRicKnMcaWVyXu1f7En2ESicLmXQ/300?n=1",
            },
            {
              id: 7772849553,
              username: "念安娜",
              title: "好评999+英文歌！轻松解压100％",
              pic: "http://qpic.y.qq.com/music_cover/R8unPZMA4Vp5v2Ms96bst9nFCfe4YPBFBADicMz2LB0kLfEiaUM4ymiag/300?n=1",
            },
            {
              id: 7175125768,
              username: "Fine",
              title: "电音爆弹！专治20年以上双腿瘫痪",
              pic: "http://qpic.y.qq.com/music_cover/lLIjmibUF1NrQu3XaJd7ickZUrv39a9b8677OIfYPiaBJ6jS7DE26yKSw/300?n=1",
            },
            {
              id: 7062721048,
              username: "๓㎕๓。 So~ °",
              title: "站内弹幕999+的古风百首歌曲",
              pic: "http://qpic.y.qq.com/music_cover/PuKOZoQ5tOmatFrS6cto8TTdP6kn3E73RAxElf3aHTqeGiaRgLaU6XvWiakJ60maT8/300?n=1",
            },
            {
              id: 7679032670,
              username: "石上优いしがみ ゆう",
              title: "疯狂踩点 l 嚣张步伐的练成方式",
              pic: "http://qpic.y.qq.com/music_cover/ggkicJwKrjksjOg2Ejw0S1YKE9rfSibibpFeFY0OGRAIaIVqVM4kgYU0g/300?n=1",
            },
            {
              id: 7073840290,
              username: "音乐还是轻点好",
              title: "渐析入梦乡 | 睡眠轻音乐",
              pic: "http://qpic.y.qq.com/music_cover/7hNs7Pn2A4gvlSzdOUicPZyFFg7zRaDjOOkz7OcRzG9JibhIK9kzrHjA/300?n=1",
            },
            {
              id: 7652459901,
              username: "与",
              title: "『欧美小众』只属于你的温柔",
              pic: "http://qpic.y.qq.com/music_cover/W20wjo2E0LstXIvx0ZjSaFL6jiaJ5qPzicoadkOMQBq6bLhdXRHTYXbhF53Viaksx1b/300?n=1",
            },
          ],
        };
        
        return baseResponse.success(data);
      },
    },
  ] as MockMethod[];
};
